<style>
	.button-table{
		margin-top:10px;
		margin-left:26px;
	}
</style>

<?php if( isset($message) && $message == "pesan" ) { ?>
	<div class="alert alert-success">
	    <span>Data Berhasil Tersimpan</span>
	</div>
<?php } elseif( isset($message) && $message == "error" ) { ?>
	<div class="alert alert-danger">
	    <span>Non - Aktifkan Salah Satu Menu atau Cek Inputan Range Nama Pendidikan Anda</span>
	</div>
<?php } else { ?>

<?php } ?>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default gradient">
			<div class="panel-heading">
				<h4>
					<span>Master Pendidikan</span>
				</h4>
			</div>
			<div class="panel-body noPad clearfix">
				<table cellpadding="0" cellspacing="0" border="0" class="dynamicTable display table table-bordered" width="100%">
					<div class="button-table">
						<button type="submit" class="btn btn-info" onClick="tambah()">
							<span class="icon16 icomoon-icon-plus-circle white"></span>
							Tambah
						</button>
						&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="button" class="btn btn-warning" onClick="kembali()">
							<span class="icon16 iconic-icon-arrow-left  white"></span>
							Kembali
						</button>
					</div>
					<thead>
						<tr>
							<th><center>No</center></th>
							<th>Pendidikan</th>
							<th>Status</th>
							<th>Aksi</th>
						</tr>
					</thead>
					<tbody>
					<?php
						$no=0;
						foreach($master_pendidikan as $row){
						$no++;
					?>
						<tr class="odd gradeX">
							<td><center><?php echo $no; ?></center></td>
							<td><?php echo $row["nm_pendidikan"]; ?></td>
							<td><?php echo ($row["status_pendidikan"] == 1) ? ("Aktif") : ("Tidak Aktif"); ?></td>
							<td>
								<div class="controls center">
									<a href="javascript:edit(<?php echo $row["kd_pendidikan"]; ?>)" title="Edit Pendidikan" class="tip"><span class="icon12 icomoon-icon-pencil"></span></a>
								</div>
							</td>
						</tr>
					<?php
					}
					?>
					</tbody>
					<!--<tfoot>
						<tr>
							<th>No</th>
							<th>Nama Ijin</th>
						</tr>
					</tfoot>-->
				</table>
			</div>
		</div><!-- End .panel -->
	</div><!-- End .span12 -->
</div><!-- End .row -->

<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.css" type="text/css" rel="stylesheet" />
<link href="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/TableTools.min.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/dataTables/ZeroClipboard.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>tables/responsive-tables/responsive-tables.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('js_path');?>datatable.js"></script>
<script type="text/javascript" src="<?php echo $this->config->item('plugin_path');?>misc/nicescroll/jquery.nicescroll.min.js"></script>
<script language="javascript">
	function tambah(){
		document.location="<?php echo site_url("master_responden/form_master_pendidikan"); ?>";
	}
	function edit(id){
		document.location="<?php echo site_url("master_responden/form_master_pendidikan"); ?>/" + id;
	}
	function kembali(){
		document.location="<?php echo site_url("master_responden"); ?>";
	}
</script>